const express = require('express');
const router = express.Router();
const get_phone_number = require('../utils/getPhoneNumber');

router.post('/v1/wechat/phone', (req, res) => {
  const { code } = req.body;
  get_phone_number(code).then(data => {
    res.send({ code: 200, data });
  }).catch(err => {
    res.send({ code: 500, err });
  })
})

module.exports = router;